package rentadomus

class Phone {
    
    String number
    Person idPerson
    String phoneType
    
    static mapping = {
        phoneType column: 'phone_type'
        idPerson column: 'id_Person'
        version false
    }
    static constraints ={
        phoneType inList:["Cell phone", "Home", "Work", "Other"]
    }
    
    String toString(){
        "$phoneType: $number"
    }
}